const http = require('http')

const server = http.createServer() // 创建服务器对象

server.on('request', () => {
  console.log('收到请求');
})

server.listen(3000, () => {
  console.log('server is running...');
})